]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ibusManager: Spawn ibus-daemon
authorRui Matos <tiagomatos@gmail.com>
Thu, 29 May 2014 13:27:42 +0000 (15:27 +0200)
committerRui Matos <tiagomatos@gmail.com>
Thu, 11 Sep 2014 17:14:46 +0000 (19:14 +0200)
gnome-settings-daemon doesn't this for us anymore. Note that
ibus-daemon isn't DBus activatable but just spawning it is fine
because it does its own single instance management. The library
notifies us when it shows up and goes away through the connected and
disconnected signals.

https://bugzilla.gnome.org/show_bug.cgi?id=736435

js/misc/ibusManager.js

index c571fb7ca52953b532433099d6c2b0d984a7b971..40a33a642b1d7df04ab1f1d8f65d6d8f5afb122d 100644 (file)
@@ -1,5 +1,6 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
+const Gio = imports.gi.Gio;
 const Lang = imports.lang;
 const Signals = imports.signals;
 
@@ -44,6 +45,17 @@ const IBusManager = new Lang.Class({
         // Need to set this to get 'global-engine-changed' emitions
         this._ibus.set_watch_ibus_signal(true);
         this._ibus.connect('global-engine-changed', Lang.bind(this, this._engineChanged));
+
+        this._spawn();
+    },
+
+    _spawn: function() {
+        try {
+            Gio.Subprocess.new(['ibus-daemon', '--xim', '--panel', 'disable'],
+                               Gio.SubprocessFlags.NONE);
+        } catch(e) {
+            log('Failed to launch ibus-daemon: ' + e.message);
+        }
     },
 
     _clear: function() {
@@ -58,6 +70,8 @@ const IBusManager = new Lang.Class({
         this._currentEngineName = null;
 
         this.emit('ready', false);
+
+        this._spawn();
     },
 
     _onConnected: function() {